Closed
Conversation
iamquang95
reviewed
Apr 2, 2026
Comment on lines
+16
to
+24
| pub fn slot_hash_root(slot: Slot) -> Result<Root> { | ||
| let mut hasher = Hasher::default(); | ||
| let index = hasher.index(); | ||
|
|
||
| hasher.put_uint64(slot)?; | ||
| hasher.merkleize(index)?; | ||
|
|
||
| Ok(hasher.hash_root()?) | ||
| } |
Collaborator
There was a problem hiding this comment.
No need this helper, tree_hash::TreeHash should implement the tree_hash_root for Slot which is u64 already.
use tree_hash::TreeHash;
let tree_hash_root = slot.tree_hash_root().0;
Collaborator
|
After further analysis seems like the PR is mostly boilerplate that we don't need. For example, In Pluto, we don't really need the indirection of this module and we already sorted it out: pluto/crates/core/src/signeddata.rs Lines 806 to 808 in a4a2ee5 The test pass as expected so the code they wrote manually is the same as the one we get from |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #303